#include "widget.h"
#include "winman.h"
#include <QApplication>
#include <QDebug>
#include <QFontDatabase>
#include <QWebEngineSettings>
int main(int argc, char *argv[])
{
    QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
    QApplication a(argc, argv);

    // 配置WebEngine安全策略
    QWebEngineSettings::defaultSettings()->setAttribute(
        QWebEngineSettings::LocalContentCanAccessRemoteUrls, true
    );
    QWebEngineSettings::defaultSettings()->setAttribute(
        QWebEngineSettings::AllowRunningInsecureContent, true
    );
//    int id = QFontDatabase::addApplicationFont("/lib/fonts/DroidSansFallback.ttf");
//    QString msyh = QFontDatabase::applicationFontFamilies (id).at(0);
//    QFont font(msyh,10);
//    qDebug() << msyh;
//    font.setPointSize(10);
//    a.setFont(font);
//    qDebug() << "SSL 支持状态：" << QSslSocket::supportsSsl();
//    qDebug() << "SSL 编译版本：" << QSslSocket::sslLibraryBuildVersionString();
//    qDebug() << "SSL 运行时版本：" << QSslSocket::sslLibraryVersionString();

    WinMan w;

    return a.exec();
}
